package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30);not null;comment:用户名"`
	Password string `gorm:"type:varchar(32);not null;comment:密码"`
}
type Hose struct {
	gorm.Model
	Name    string `gorm:"type:varchar(30);not null;comment:房屋名称"`
	Address string `gorm:"type:varchar(300);not null;comment:地址"`
}

func (h *Hose) HoseGroupById(db *gorm.DB, id int64) error {
	return db.Debug().Where("id=?", id).First(h).Error
}
